package com.open.capacity.answer.dao;

import com.open.capacity.common.model.Answer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface AnswerDao {
    /**
     * 统计总数
     * @param params
     * @return
     */
    int count(Map<String, Object> params);

    /**
     * 模糊查询疑问
     * @param params
     * @return
     */
    List<Answer> getSelectAnswers(Map<String, Object> params);

    /**
     * 发布疑问
     * @param answer
     * @return
     */
    int addAnswer(Answer answer);

    /**
     * 修改疑问
     * @param answer
     * @return
     */
    int updateAnswer(Answer answer);

    /**
     * 删除疑问
     * @param id
     * @return
     */
    int delAnswer(int id);

    /**
     * 修改评论条数
     * @param id
     * @param commentCount
     * @return
     */
    int updateCommentCount(int id, int commentCount);
}
